-
Notifications
You must be signed in to change notification settings - Fork 0
/
Year 68 - Goodbye Humans
290 lines (285 loc) · 3.8 KB
/
Year 68 - Goodbye Humans
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
-- 7 Billion Humans (2214M) --
-- 68: Goodbye, Humans! by @commonnickname --
jump a
mem1 = foreachdir sw:
mem2 = foreachdir s:
mem3 = foreachdir se:
a:
jump b
endfor
endfor
endfor
b:
if mem2 == nothing:
step s
step s
endif
if mem3 == nothing or
mem1 == nothing:
step e
step s
step s
jump c
endif
mem4 = set sw
if mem1 == worker and
mem2 == worker and
mem3 == worker:
if mem4 == nothing:
jump d
else:
mem1 = foreachdir nw,n:
endfor
mem1 = set myitem
jump e
mem1 = foreachdir s:
e:
if mem1 == nothing:
step sw
jump f
else:
mem1 = set c
endif
endfor
endif
jump g
mem1 = foreachdir sw:
mem2 = foreachdir s:
mem3 = foreachdir se:
mem4 = foreachdir e:
g:
if mem1 == nothing or
mem2 == nothing or
mem3 == nothing or
mem4 == nothing:
if mem4 == nothing:
step n
step e
step se
jump h
else:
step s
step s
step s
step s
step s
if mem1 == nothing:
step w
endif
jump i
endif
else:
mem1 = set sw
mem2 = set se
if ne == nothing:
jump j
endif
if s == nothing and
ne != wall:
step s
if mem1 != nothing:
step e
endif
if mem2 != nothing:
step e
endif
step s
step s
jump k
endif
jump l
endif
endfor
endfor
endfor
endfor
mem1 = foreachdir nw:
l:
if mem1 == worker:
step s
step s
jump m
mem1 = foreachdir n:
m:
if mem1 == nothing:
step e
step e
step e
step e
step e
step s
step w
step s
step w
step s
jump n
endif
if mem4 == nothing:
jump o
endif
step s
step w
step n
step w
step n
jump p
endfor
endif
if mem1 == hole:
tell everyone hi
mem1 = set c
jump q
endif
endfor
r:
jump s
mem1 = foreachdir w:
s:
if mem1 != hole:
step w
jump r
endif
endfor
step s
step s
step s
step s
step e
step s
jump t
endif
if mem1 == worker and
mem2 == worker and
mem3 == wall and
mem4 == worker:
jump u
mem1 = foreachdir s:
u:
if mem1 == nothing:
jump v
endif
endfor
if sw == nothing:
step sw
v:
step s
jump w
endif
if e == wall:
step sw
jump x
else:
step s
step s
jump y
endif
endif
if w == nothing:
step sw
jump z
endif
if e == wall:
jump aa
endif
if mem3 == nothing:
step w
step n
jump ab
endif
if w == worker and
sw == wall and
s == worker:
jump ac
endif
tell everyone hi
tell everyone hi
if nw == hole or
w == hole or
sw == hole and
n == worker:
if w == hole or
nw == hole:
step n
endif
if w == hole:
step n
endif
jump ad
endif
if mem2 == wall and
mem3 == wall:
mem1 = foreachdir nw,w,sw,n,s,ne,e,se:
tell everyone hi
endfor
jump ae
endif
if se != hole:
mem1 = foreachdir nw,w,sw,n,s,ne,e,se:
tell everyone hi
endfor
if n == hole:
step se
else:
step ne
endif
jump af
endif
comment 2
step sw
step sw
step sw
step s
step s
mem1 = foreachdir nw,n,ne,e:
tell w hi
endfor
mem1 = set c
tell everyone goodbye
step sw
step s
comment 1
af:
ad:
q:
p:
step e
ac:
ab:
t:
step e
o:
j:
step e
jump ag
comment 0
ae:
step w
aa:
y:
step w
x:
k:
h:
step w
z:
w:
i:
c:
n:
step w
d:
f:
ag:
ah:
step s
jump ah
DEFINE COMMENT 0
eJzjZgCCEgYthkIGN4ZUhhaGFIYJQDyvIYVhEUMWw5KGOiBuZ1jU0MEwi2EUjIJRMOwAAPdyC8E;
DEFINE COMMENT 1
eJyTYmBgaNBnkGswYLAB4gUMBgybGEBihgwGDWYMGg32QDlPBgkGfwYphiAGhYZgBhWGMAYjILZqCGVw
YQhh8GkIYAhrcGVIYHBkSGKwYkhqsGPIAOppYwhmmNUQybCgIRpo7igYBaNgUAIAgp4WBg;
DEFINE COMMENT 2
eJztjT8LQXEUhp+PYTApZTIZJFGKMPm7GETp0l2UwWDgTbomZbiDLFajIrkyGNkNPo7fvd/Afp96O6ee
zntSGBLEFCdFlJEiiAiu8ri+UtPYFkkzC9TpqMKWIrfAtcmqQ4MuNj2kPnsNuJo8fE+fnUrsgn1Lmg0Z
rSloSs2/kI3FmIlmLLXAkcOeNUdWnDTnLosvQz7BL48cHpYuHHXmYfIKet+U9aSqg4lrekNCQv7iB0bw
Ngk;